bpo-45490: Convert unicodeobject.h macros to static inline functions#31221
Closed
vstinner wants to merge 1 commit intopython:mainfrom
vstinner:unicode_static_inline
Closed
bpo-45490: Convert unicodeobject.h macros to static inline functions#31221vstinner wants to merge 1 commit intopython:mainfrom vstinner:unicode_static_inline
vstinner wants to merge 1 commit intopython:mainfrom
vstinner:unicode_static_inline
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Convert unicodeobject.h macros to static inline functions.
Reorder functions to declare functions before their first usage.
Add "kind" variable to PyUnicode_READ_CHAR() and
PyUnicode_MAX_CHAR_VALUE() functions to only call PyUnicode_KIND()
once.
PyUnicode_KIND() now returns an "enum PyUnicode_Kind".
Simplify PyUnicode_GET_SIZE().
Add assertions to PyUnicode_WRITE() on the max value.
Add cast macros:
The following functions are now declared as deprecated using
Py_DEPRECATED(3.3):
warnings in their body.
PyUnicode_READ_CHAR() now uses PyUnicode_1BYTE_DATA(),
PyUnicode_2BYTE_DATA() and PyUnicode_4BYTE_DATA().
Replace "const PyObject*" with "PyObject*" in _decimal.c
and pystrhex.c: PyUnicode_READY() can modify the object.
Replace "const void *data" with "void *data" in some unicodedata.c
and unicodeobject.c functions which use PyUnicode_WRITE(): data is
used to modify the string.
https://bugs.python.org/issue45490